public class demo {
    public static void main(String[] args) {
        int[] array = {0,1,2,3,5,6,7,8,9};
        int i = 0;
        int k = 0;
        boolean flg = false;
        for (i = 0;i < array.length+1;i++){
            flg = false;
            for (k = 0; k < array.length;k++){
                if (i == array[k]){
                    flg = true;
                    break;
                }
            }
            if (flg){
                continue;
            }else {
                System.out.println(i);
            }
        }
    }
}
